/*
 * GlobalMem.h
 *
 *  Created on: 2012-9-1
 *      Author: yangentao@gmail.com
 */

#pragma once;
#include <windows.h>
namespace yet{
class GlobalMem {
	HGLOBAL hand;
public:
	void *ptr;
public:
	GlobalMem();
	GlobalMem(HGLOBAL hand_);
	virtual ~GlobalMem() ;
	void Allocate(size_t bytes);
	HGLOBAL Unlock();
	void SetClip(UINT uFormat);
	operator bool() const ;
	SIZE_T Size();
};
}
